﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Topshelf;

namespace BMS.Syncro.Devices.Host
{
    public class Bootstrap
    {
        static void Main(string[] args)
        {
            HostFactory.Run(x =>
            {
                x.Service<Controller>(s =>
                {
                    s.ConstructUsing(name => new Controller());
                    s.WhenStarted(tc => tc.Start());
                    s.WhenStopped(tc => tc.Stop());
                });
                x.SetDescription("Servicio para la sincronización de usuarios en dispositivos biométricos");
                x.SetDisplayName("Intelisoft.Bms.SynchroBiometricDevices.Host");
                x.SetServiceName("Intelisoft.Bms.SynchroBiometricDevices.Host");
            });
            new Controller().Start();
            Console.Read();
        }
    }
}
